#include <stdio.h>
#include <stdlib.h>

#define N 24

float Ave(float x[], int n);//1
int Count(float x[], int n);//1

int main()
{		   	   
    int n, i = 0;
    printf("The number of month is:\n");
    scanf("%d", &n);

    printf("Enter passenger traffic between(0<p<500):\n");
    float rainfall[N];

    for (i = 0; i < n; ++i)//1
    {		   	   
        scanf("%f", &rainfall[i]);//1
    }

    printf("The average of passenger traffic is %.2f\n", Ave(rainfall, n));//1
    printf("The number above 100w and below 300w is: %d\n", Count(rainfall, n));//1

    return 0;
}		   	   

float Ave(float x[], int n)
{		   	   
    float result = 0;//1
    int i = 0;
    if (n == 0)//1
        return 0;//1

    for (i = 0; i < n; ++i)//1
    {		   	   
        result += x[i];//1
    }
    return result / n;//1
}		   	   

int Count(float x[], int n)
{		   	   
    int count = 0, i = 0;//1
    for (i = 0; i < n; ++i)//1
    {		   	   
        if (x[i] >= 100 && x[i] < 300)//1
            ++count;//1
    }
    return count;//1
}